home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / TRIML.CC < prev    next >
Text File  |  1993-04-04  |  505b  |  20 lines

  1. trim_l(char *str)
  2. /* This will remove all blanks from the left side of the string
  3.    pointed to by *str.
  4. */
  5. {
  6.         int non_blank_found = 0;
  7.         char *newstr;
  8.         newstr=str;
  9.         while(*str) {
  10.                 if(*str==' ' && !non_blank_found)
  11.                         str++;
  12.                 else {
  13.                         non_blank_found=1;
  14.                         *newstr=*str;
  15.                         newstr++; str++;
  16.                 }
  17.         }
  18.         *newstr=0x00;
  19. }
  20.